home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / umoria / patch4 < prev    next >
Encoding:
Text File  |  1988-11-30  |  63.8 KB  |  1,872 lines

  1. First of all, I should point out that the version of umoria recently posted
  2. in comp.sources.games already had the first three patches applied.
  3. You can verify this by looking in the README file.  This latest patch
  4. adds the 'patchlevel' info to the version command to make it easier to 
  5. determine the patch level.
  6.  
  7. Applying the Patches:
  8.  
  9. If you have a copy of the game that you ftp'ed from ucbarpa, then
  10. you may have trouble applying the patches.  Apparently, there were some
  11. differences between the version I had available via ftp and the version
  12. that was posted.  You can either apply by hand the patches that fail,
  13. or you can ftp a copy of the posted version from the comp.sources.games
  14. archives on uunet.uu.net.
  15.  
  16. If you have applied any of the semi-official patches posted to 
  17. rec.games.moria, then a few of these patches will fail.  You can ignore a 
  18. patch if you have an equivalent one already installed.
  19.  
  20. As always, don't forget to use the -N option of patch!
  21.  
  22. Problems fixed:
  23.  
  24. There have been two bugs reported that can cause core dumps.
  25. 1) fighting a Lich (any kind) or Balrog with no items in inventory
  26. 2) regaining more than 22 spells due to the use of a "restore level" potion
  27. Both of these bugs are fixed by this patch file.
  28.  
  29. I have added an option to the config.h file, so that the person installing
  30. the game can decide whether or not panic saved games should have their
  31. scores entered into the scoreboard.  The default is to not save scores
  32. from panic save files.
  33.  
  34. A number of minor problems have been fixed, some of the more visible fixes:
  35. 1) no longer need to be next to a monster for polymorph to work
  36. 2) the map command failed if output width was not a divisor of 196
  37. 3) dispell now awards experience points when it kills a monster
  38. 4) using the destroy trap spell on a chest now changes the name of the chest
  39. 5) add plurals to magic books, and pints of ale/wine
  40. 6) panic save and exit if read EOF from stdin, (was a problem for some people
  41.    who wrote automatic rerolling programs)
  42.  
  43. Many other minor problems have been fixed also.  Many, many bugs still
  44. remain.
  45.  
  46. A complete, although occasionally cryptic, list of fixes and remaining bugs
  47. can be found in the file PROBLEMS.
  48.  
  49. Jim Wilson                  "If winning is not important, then why keep score?"
  50. wilson@ji.Berkeley.EDU          Worf - Star Trek: The Next Generation
  51. ucbvax!ucbji!wilson
  52.  
  53. #! /bin/sh
  54. # This is a shell archive.  Remove anything before this line, then unpack
  55. # it by saving it into a file and typing "sh file".  To overwrite existing
  56. # files, type "sh file -c".  You can also feed this as standard input via
  57. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  58. # will see the following message at the end:
  59. #        "End of shell archive."
  60. # Contents:  patches04
  61. # Wrapped by billr@tekred on Tue Nov 29 17:07:48 1988
  62. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  63. if test -f patches04 -a "${1}" != "-c" ; then 
  64.   echo shar: Will not over-write existing file \"patches04\"
  65. else
  66. echo shar: Extracting \"patches04\" \(60251 characters\)
  67. sed "s/^X//" >patches04 <<'END_OF_patches04'
  68. X*** oldmoria/INSTALL    Sun Oct 30 01:18:12 1988
  69. X--- newmoria/INSTALL    Sun Oct 30 01:07:29 1988
  70. X***************
  71. X*** 23,26 ****
  72. X--- 23,32 ----
  73. X  define NO_SIGNED_CHARS in config.h.
  74. X  
  75. X+ By default, scores from panic saved games are not stored into the
  76. X+ scoreboard.  Some sites have a lot of trouble with HANGUP signals though.
  77. X+ If so, you can allow scores of panic saved games to be recorded by defining
  78. X+ SCORE_PANIC_SAVES.  This is not recommended, as it enables some rather
  79. X+ devious cheating methods.
  80. X+ 
  81. X  Moria may not compile properly on SYS III machines(?)
  82. X  
  83. X*** oldmoria/Int16bit.patch    Sun Oct 30 01:17:48 1988
  84. X--- newmoria/Int16bit.patch    Sun Oct 30 01:08:00 1988
  85. X***************
  86. X*** 393,397 ****
  87. X    {
  88. X      register int i;
  89. X!     register int mask = 0x1;
  90. X    
  91. X  !   for (i = 0; i < sizeof(int)*8; i++) {
  92. X--- 393,397 ----
  93. X    {
  94. X      register int i;
  95. X! !    register int mask = 0x1;
  96. X    
  97. X  !   for (i = 0; i < sizeof(int)*8; i++) {
  98. X***************
  99. X*** 406,410 ****
  100. X    {
  101. X      register int i;
  102. X!     register int mask = 0x1;
  103. X    
  104. X  !   for (i = 0; i < sizeof(*test)*8; i++) {
  105. X--- 406,410 ----
  106. X    {
  107. X      register int i;
  108. X! !   bitset_t mask = 0x1;
  109. X    
  110. X  !   for (i = 0; i < sizeof(*test)*8; i++) {
  111. X***************
  112. X*** 500,504 ****
  113. X      int new_spell;
  114. X      int test_array[32];
  115. X! !   bitset_t int spell_flag;
  116. X      int learn;
  117. X      register spell_type *s_ptr;
  118. X--- 500,504 ----
  119. X      int new_spell;
  120. X      int test_array[32];
  121. X! !   bitset_t spell_flag;
  122. X      int learn;
  123. X      register spell_type *s_ptr;
  124. X*** oldmoria/Moria_news    Sun Oct 30 01:16:40 1988
  125. X--- newmoria/Moria_news    Sun Oct 30 01:07:31 1988
  126. X***************
  127. X*** 9,13 ****
  128. X  UNIX Port : James E. Wilson    / UC Berkeley
  129. X  
  130. X- This is a beta release of umoria 4.87
  131. X- 
  132. X  Dungeon Master: This file may contain updates and news.
  133. X--- 9,11 ----
  134. X*** oldmoria/PROBLEMS    Sun Oct 30 01:17:44 1988
  135. X--- newmoria/PROBLEMS    Sun Oct 30 01:07:32 1988
  136. X***************
  137. X*** 466,469 ****
  138. X--- 466,527 ----
  139. X  many files: change move_char(5) to move_light(char_row, char_col, char_row,
  140. X      char_col), avoid problems with potential recursive calls to move_char()
  141. X+ sent out u487.p3 patch file
  142. X+ --------------------- 7/6
  143. X+ Int16bit.patch: change "bitset_t int" to "bitset_t"
  144. X+ config.h: NO_SIGNED_CHARS was missing trailing */
  145. X+ Moria_news: delete beta release comment
  146. X+ --------------------- 7/8
  147. X+ spells.c: fixed poly_monster, only worked when next to monster
  148. X+ --------------------- 8/9
  149. X+ save.c: printing of version changed from %lf to %.2lf
  150. X+ config.h: eliminated comment about dynix not needing BUGGY_CURSES
  151. X+ --------------------- 8/13
  152. X+ Int16bit.patch: mask in bit_pos() in misc1.c should be bitset_t, not int
  153. X+ --------------------- 8/15
  154. X+ misc2.c,spells.c: changed array decl for function parameters (e.g. vtype)
  155. X+     to pointers (e.g. char *)
  156. X+ --------------------- 8/24
  157. X+ help.c: change char for original mode shell_out command from $ to !
  158. X+ files.c: null terminate dun_line in after inner_loop; make filename, page_width
  159. X+      and page_height static to remember new default values
  160. X+ save.c: change references of st_atime to st_mtime, prevent automatic backup
  161. X+     programs from corrupting save files
  162. X+ -------------------- 9/21
  163. X+ creature.c: for drain charge attack (24), only succeed if there is comething
  164. X+     in the player's inventory
  165. X+ --------------------- 9/30
  166. X+ moria1.c: missing 'int' keyword added back in
  167. X+ --------------------- 10/10
  168. X+ moria1.c: sub3_move_light, change order of declarations since it caused a
  169. X+     problem on a 3B2
  170. X+ types.h: spl_type declared as array of 22 when should have been array of 32
  171. X+ ---------------------- 10/17
  172. X+ externs.h: t_level declared incorrectly
  173. X+ ---------------------- 10/29
  174. X+ *.c: fix all uses of divide operator, eliminate unnecessary floating point
  175. X+     operations, distinguish between round() and trunc()/div in VMS source
  176. X+ monsters.c: changed invisible stalker from 'E' to 'I'
  177. X+ spells.c: fixed td_destroy, so that when it destroys trap on chest, it also changes
  178. X+     name of chest to reflect this
  179. X+ moria2.c, spells.c: eliminated first extraneous space in " (Empty)" etc. strings
  180. X+ scrolls.c: fixed dangling pointer bug, was calling inven_destroy, and then using
  181. X+     pointer to destroyed object
  182. X+ files.c, death.c: add name of score file to "can't open" error messages
  183. X+ moria2.c: examine_book does not work if blind/no light/confused
  184. X+ treasure1.c, treasure2.c: add plurals to magic books, and pints of ale/wine
  185. X+ io.c: panic save if read EOF from stdin
  186. X+ main.c, save.c, signals.c: only panic save if character generation is complete,
  187. X+     eliminated variable generate
  188. X+ signals.c: flush input in control-C handler, move put_qio so "y/n?" message erased
  189. X+ dungeon.c: ^A (0) no longer asks if you want to quit, can be returned by an
  190. X+     interrupted getchar call
  191. X+ moria1.c: area_affect does not need to test find_flag, it is always true
  192. X+ treasure1.c: change potion of water to "crystal clear", so no conflict with 
  193. X+     randomly named potions
  194. X+ config.h, death.c, save.c: added option SCORE_PANIC_SAVES for those who
  195. X+     find the non-scoring panic_save feature annoying
  196. X+ store2.c: add asterisk to call through function pointer, some compilers need this
  197. X+ constants.h, README, wizard.c: update patch level to 4, create PATCHLEVEL
  198. X+     define and print it out with version command
  199. X  
  200. X  Working on:
  201. X***************
  202. X*** 480,507 ****
  203. X  
  204. X  Things to be fixed:
  205. X! 
  206. X! check plurals "~" in object names, esp. Pint in treasure2.c
  207. X! make get_panel run stops user customizable?
  208. X! objects in outside corners do not stop run
  209. X! moria1.c: area_affect does not need to check "if (find_flag)"
  210. X! carefully check everyplace that clears find_flag, there are a lot
  211. X!     of unnecessary checks, perhaps even some recursive calls to move_char
  212. X! check setting of moria_flag in dungeon.c, esp. after restore_char ()
  213. X  add "moria ^file" option to automatically do wizard restore,
  214. X     do the umask calls in the program instead of forcing user to type them
  215. X! don't ask for quit on char '\0', should instead ignore it
  216. X! check for EOF when reading characters
  217. X! complaint that a hangup (kill -1) results in a game whose
  218. X!     score will no longer be posted to the scoreboard
  219. X! resting should have small but finite chance of waking a monster
  220. X!   perhaps check once every 10 turns against randint(6) > stealth
  221. X! cursor should be positioned somewhere before each inkey call
  222. X  all npc spells should print descriptive message
  223. X  allow rerolling after choose race/class
  224. X! remove "clear" from random potion names?
  225. X  pad should take a char not a string
  226. X- print a number with the repeat_msg command
  227. X  Message line overextending into second line should be erased
  228. X! identify staffs/wands as having zero charges, when they run out
  229. X  ``can't carry that much weight'' before ``that many items'' is wrong?
  230. X     I like it the way it is now, though
  231. X--- 538,582 ----
  232. X  
  233. X  Things to be fixed:
  234. X! suspend handler should save/restore local special characters,
  235. X!     need routine to surround or replace suspend_handdler()
  236. X! these commands which take a dir should not work when confused,
  237. X!    bash, tunnel, closeobject, jamdoor, openobject
  238. X  add "moria ^file" option to automatically do wizard restore,
  239. X     do the umask calls in the program instead of forcing user to type them
  240. X! some armor have negative to-hit values, should this be part of the name?
  241. X!    mention this in the Moria.doc file
  242. X! add a pull-back map command like the PC version, display entire map on screen
  243. X!    only showing important features, like stairs
  244. X! apply the new.16bit.patches to create a new Int16bit.patch file
  245. X! identify staffs/wands as having zero charges, when they run out
  246. X! list of spell books not cleared when get cast which spell? prompt
  247. X! wielding heavy wepaons, fix + to hit on screen?
  248. X!     ptho subtracted in attak_blows() misc2.c, could probably subtract
  249. X!     these point in moria1.c py_bonuses(), when calculate dis_th
  250. X! should one really be able to find a chest inside of another chest??
  251. X! received report that someone once lost a light source because of the 
  252. X!     wield/wear command, I don't see anything wrong though
  253. X! trap names are vague,
  254. X!    have two names for each trap, a simple search discloses current vague name,
  255. X!    setting it off, or a find/identify trap gives the long name
  256. X! use of reset_flag for free moves still a little inconsistent
  257. X!     commands that only use objects in backpack (use,aim,quaff,eat,read_scroll,
  258. X!         pray,cast,etc.) are free move if no action taken,
  259. X!     other commands (bash,openobject,closeobject,jamdoor,etc.) always use move
  260. X!         even if no action taken
  261. X! problems with mass polymorph wand?  I once ended up surrounded by
  262. X!   non existant mushrooms after many zaps.  I think it is a race, i.e.
  263. X!   scans monster list while adding and deleting elements.
  264. X!   - this can also while cloning cubes
  265. X!   - also, when compact_monsters deletes a monster, it does not update screen
  266. X! add scorefile editing functions, perhaps just have an ascii score file?
  267. X! should low level monsters be able to eat high level monsters?
  268. X! objects in outside corners do not stop run
  269. X  all npc spells should print descriptive message
  270. X  allow rerolling after choose race/class
  271. X! cursor should be positioned somewhere before each inkey call
  272. X  pad should take a char not a string
  273. X  Message line overextending into second line should be erased
  274. X! print a number with the repeat_msg command
  275. X  ``can't carry that much weight'' before ``that many items'' is wrong?
  276. X     I like it the way it is now, though
  277. X***************
  278. X*** 509,512 ****
  279. X--- 584,589 ----
  280. X      perhaps use only motion optimization stuff?
  281. X  Dot tunneling command
  282. X+ resting should have small but finite chance of waking a monster
  283. X+   perhaps check once every 10 turns against randint(6) > stealth
  284. X  encrypt info before writing it to the save file
  285. X     perhaps xor with stat buffer
  286. X***************
  287. X*** 517,522 ****
  288. X      of the vault_trap bug fixed 4/6
  289. X  subval, missile_ctr could be short ints
  290. X- note that some armor can decrease to-hit values in docs,
  291. X-     should these be displayed in name?
  292. X  missing amulets, 1-4 strength, constitution, intelligence, dexterity
  293. X  missing rings 5-6 gain wisdom, gain charisma
  294. X--- 594,597 ----
  295. X***************
  296. X*** 529,533 ****
  297. X      perhaps some ifdefed code which does no-blocking I/O for them?
  298. X  add death due to starvation
  299. X- wielding heavy wepaons, fix + to hit on screen?
  300. X  don't let dragons breathe on first attack, AMHD is nasty
  301. X      especially after the screen changes to the next panel
  302. X--- 604,607 ----
  303. X***************
  304. X*** 534,538 ****
  305. X  checking both ((!m_ptr->ml) or (!see_invis && mon invis)) is probably
  306. X      redundant when determining whether or not player can see a monster
  307. X- list of spell books not cleared when get cast which spell? prompt
  308. X  should we call m_name if spell only applies to visible creatures?
  309. X  many spells do not print desciptive comment, aggravate_monster for instance
  310. X--- 608,611 ----
  311. X***************
  312. X*** 562,567 ****
  313. X  in general, loss of an ability should have many affects, non of which are 
  314. X      implemented, for example, lose of intelligence should cause a mage
  315. X!     to lose spells
  316. X! cases of permanent slowness reported?
  317. X  add user name to scoreboard?
  318. X  also add points and experience to scoreboard
  319. X--- 635,640 ----
  320. X  in general, loss of an ability should have many affects, non of which are 
  321. X      implemented, for example, lose of intelligence should cause a mage
  322. X!     to lose spells, gain of int should cause mage to learn spells
  323. X! cases of permanent slowness reported, why does this happen?
  324. X  add user name to scoreboard?
  325. X  also add points and experience to scoreboard
  326. X***************
  327. X*** 570,574 ****
  328. X  change turn to a long
  329. X  store_open should be a long
  330. X- use of reset_flag for free moves still a little inconsistent
  331. X  fix save files to include obj desc, then only need one random number
  332. X      generator which can use table program
  333. X--- 643,646 ----
  334. X***************
  335. X*** 575,582 ****
  336. X  replace magic numbers with constants
  337. X  name objects if use did not identify them
  338. X  
  339. X- add a pull-back map command like the PC version, display entire map on screen
  340. X-    only showing important features, like stairs
  341. X- 
  342. X  Very Hard things to add:
  343. X  recenter character on screen?
  344. X--- 647,654 ----
  345. X  replace magic numbers with constants
  346. X  name objects if use did not identify them
  347. X+ light spells should work in corridors, what they light should be permanent
  348. X+ creeping coins should leaves coins as treasure
  349. X+ when creature steals and then dies, the stolen item should appear
  350. X  
  351. X  Very Hard things to add:
  352. X  recenter character on screen?
  353. X***************
  354. X*** 588,593 ****
  355. X--- 660,667 ----
  356. X  'flavor' the levels, dragons on one level, undead on another, etc.
  357. X  what's been discovered list
  358. X+ make get_panel run stops user customizable? via environment variable
  359. X  use environment variables to specify rogue-like/original keys
  360. X  use environment variable for default save file
  361. X+ use environment variables for files.c: page_height,page_width, filename
  362. X  add option to restore files from default save filename
  363. X  commands not close enough to rogue style
  364. X*** oldmoria/README    Sun Oct 30 01:16:34 1988
  365. X--- newmoria/README    Sun Oct 30 01:07:32 1988
  366. X***************
  367. X*** 1,4 ****
  368. X  
  369. X! This copy of umoria includes the first three patch files (upto u487.p3).
  370. X  
  371. X  Please report problems to wilson@ji.Berkeley.EDU  (ucbvax!ucbji!wilson).
  372. X--- 1,4 ----
  373. X  
  374. X! This copy of 4.87 umoria includes the first four patch files (upto u487.p4).
  375. X  
  376. X  Please report problems to wilson@ji.Berkeley.EDU  (ucbvax!ucbji!wilson).
  377. X*** oldmoria/config.h    Sun Oct 30 01:16:45 1988
  378. X--- newmoria/config.h    Sun Oct 30 01:07:32 1988
  379. X***************
  380. X*** 38,43 ****
  381. X  /* if the screen does not look right (it will be obvious) then you have a buggy
  382. X     version of curses, and you must define this */
  383. X! /* this must be defined for Ultrix systems, and for most 4.2BSD systems
  384. X!    it is not needed for Dynix */
  385. X  /* only need to recompile io.c */
  386. X  /* #define BUGGY_CURSES */
  387. X--- 38,42 ----
  388. X  /* if the screen does not look right (it will be obvious) then you have a buggy
  389. X     version of curses, and you must define this */
  390. X! /* this must be defined for Ultrix systems, and for most 4.2BSD systems */
  391. X  /* only need to recompile io.c */
  392. X  /* #define BUGGY_CURSES */
  393. X***************
  394. X*** 45,49 ****
  395. X  /* define this is your machine does not have signed characters:
  396. X     this is needed for IBM PC-RT, 3B1, 3B2, 3B20, and perhaps others */
  397. X! /* #define NO_SIGNED_CHARS
  398. X  
  399. X  /* this will slow down the game a bit, and therefore make it use up a little
  400. X--- 44,48 ----
  401. X  /* define this is your machine does not have signed characters:
  402. X     this is needed for IBM PC-RT, 3B1, 3B2, 3B20, and perhaps others */
  403. X! /* #define NO_SIGNED_CHARS */
  404. X  
  405. X  /* this will slow down the game a bit, and therefore make it use up a little
  406. X***************
  407. X*** 52,55 ****
  408. X--- 51,61 ----
  409. X  /* only need to recompile dungeon.c and create.c
  410. X  /* #define SLOW */
  411. X+ 
  412. X+ /* if this is defined, scores from panic save files will be added to the
  413. X+    scoreboard, this is not recommended because it enables several rather
  414. X+    devious cheating methods, however, it is useful on systems where HANGUP
  415. X+    signals are common (i.e. lots of dialup users, unreliable terminal
  416. X+    multiplexors, etc.) */
  417. X+ /* #define SCORE_PANIC_SAVES */
  418. X  
  419. X  /* system dependent defines follow, you should not need to change anything
  420. X*** oldmoria/constants.h    Sun Oct 30 01:18:04 1988
  421. X--- newmoria/constants.h    Sun Oct 30 01:07:33 1988
  422. X***************
  423. X*** 10,13 ****
  424. X--- 10,14 ----
  425. X  /* Current version number of Moria                */
  426. X  #define CUR_VERSION 4.87
  427. X+ #define PATCH_LEVEL 4
  428. X  
  429. X  #ifndef TRUE
  430. X*** oldmoria/creature.c    Sun Oct 30 01:17:37 1988
  431. X--- newmoria/creature.c    Sun Oct 30 01:07:34 1988
  432. X***************
  433. X*** 423,427 ****
  434. X      case 24:      /*Eat charges       */
  435. X        if (test_hit(15, (int)c_ptr->level, 0, p_ptr->pac+p_ptr->ptoac))
  436. X!         flag = TRUE;
  437. X        break;
  438. X      case 99:
  439. X--- 423,428 ----
  440. X      case 24:      /*Eat charges       */
  441. X        if (test_hit(15, (int)c_ptr->level, 0, p_ptr->pac+p_ptr->ptoac))
  442. X!         if (inven_ctr > 0)  /* check to make sure an object exists */
  443. X!           flag = TRUE;
  444. X        break;
  445. X      case 99:
  446. X***************
  447. X*** 1171,1175 ****
  448. X        (void) strcat(cdesc, "breathes lightning.");
  449. X        msg_print(cdesc);
  450. X!       breath(1, char_row, char_col, (int)(m_ptr->hp/4.0), ddesc);
  451. X        break;
  452. X      case 21:  /*Breath Gas   */
  453. X--- 1172,1176 ----
  454. X        (void) strcat(cdesc, "breathes lightning.");
  455. X        msg_print(cdesc);
  456. X!       breath(1, char_row, char_col, (m_ptr->hp / 4), ddesc);
  457. X        break;
  458. X      case 21:  /*Breath Gas   */
  459. X***************
  460. X*** 1176,1180 ****
  461. X        (void) strcat(cdesc, "breathes gas.");
  462. X        msg_print(cdesc);
  463. X!       breath(2, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  464. X        break;
  465. X      case 22:  /*Breath Acid  */
  466. X--- 1177,1181 ----
  467. X        (void) strcat(cdesc, "breathes gas.");
  468. X        msg_print(cdesc);
  469. X!       breath(2, char_row, char_col, (m_ptr->hp / 3), ddesc);
  470. X        break;
  471. X      case 22:  /*Breath Acid  */
  472. X***************
  473. X*** 1181,1185 ****
  474. X        (void) strcat(cdesc, "breathes acid.");
  475. X        msg_print(cdesc);
  476. X!       breath(3, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  477. X        break;
  478. X      case 23:  /*Breath Frost */
  479. X--- 1182,1186 ----
  480. X        (void) strcat(cdesc, "breathes acid.");
  481. X        msg_print(cdesc);
  482. X!       breath(3, char_row, char_col, (m_ptr->hp / 3), ddesc);
  483. X        break;
  484. X      case 23:  /*Breath Frost */
  485. X***************
  486. X*** 1186,1190 ****
  487. X        (void) strcat(cdesc, "breathes frost.");
  488. X        msg_print(cdesc);
  489. X!       breath(4, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  490. X        break;
  491. X      case 24:  /*Breath Fire  */
  492. X--- 1187,1191 ----
  493. X        (void) strcat(cdesc, "breathes frost.");
  494. X        msg_print(cdesc);
  495. X!       breath(4, char_row, char_col, (m_ptr->hp / 3), ddesc);
  496. X        break;
  497. X      case 24:  /*Breath Fire  */
  498. X***************
  499. X*** 1191,1195 ****
  500. X        (void) strcat(cdesc, "breathes fire.");
  501. X        msg_print(cdesc);
  502. X!       breath(5, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  503. X        break;
  504. X      default:
  505. X--- 1192,1196 ----
  506. X        (void) strcat(cdesc, "breathes fire.");
  507. X        msg_print(cdesc);
  508. X!       breath(5, char_row, char_col, (m_ptr->hp / 3), ddesc);
  509. X        break;
  510. X      default:
  511. X***************
  512. X*** 1350,1354 ****
  513. X                else if (py.flags.rest < 1)
  514. X              if (randint(10) > py.misc.stl)
  515. X!               m_ptr->csleep -= (75.0/m_ptr->cdis);
  516. X              if (m_ptr->stunned > 0)
  517. X                m_ptr->stunned--;
  518. X--- 1351,1355 ----
  519. X                else if (py.flags.rest < 1)
  520. X              if (randint(10) > py.misc.stl)
  521. X!               m_ptr->csleep -= (75 / m_ptr->cdis);
  522. X              if (m_ptr->stunned > 0)
  523. X                m_ptr->stunned--;
  524. X*** oldmoria/death.c    Sun Oct 30 01:18:05 1988
  525. X--- newmoria/death.c    Sun Oct 30 01:07:35 1988
  526. X***************
  527. X*** 133,140 ****
  528. X    high_scores score;
  529. X    char list[20][256];
  530. X  
  531. X    if (1 > (fd = open(MORIA_TOP, O_RDONLY, 0644)))
  532. X      {
  533. X!       prt("Error opening top twenty file\n", 0, 0);
  534. X        return ;
  535. X      }
  536. X--- 133,142 ----
  537. X    high_scores score;
  538. X    char list[20][256];
  539. X+   char string[100];
  540. X  
  541. X    if (1 > (fd = open(MORIA_TOP, O_RDONLY, 0644)))
  542. X      {
  543. X!       sprintf (string, "Error opening score file \"%s\"\n", MORIA_TOP);
  544. X!       prt(string, 0, 0);
  545. X        return ;
  546. X      }
  547. X***************
  548. X*** 267,270 ****
  549. X--- 269,273 ----
  550. X      exit_game();
  551. X  
  552. X+ #ifndef SCORE_PANIC_SAVES
  553. X    if (panic_save == 1)
  554. X      {
  555. X***************
  556. X*** 275,278 ****
  557. X--- 278,282 ----
  558. X        exit_game();
  559. X      }
  560. X+ #endif
  561. X  
  562. X    myscore.points = (long)total_points();
  563. X*** oldmoria/dungeon.c    Sun Oct 30 01:17:26 1988
  564. X--- newmoria/dungeon.c    Sun Oct 30 01:07:53 1988
  565. X***************
  566. X*** 704,708 ****
  567. X          if (randint(100) == 1)
  568. X            {
  569. X!             find_flag = FALSE; /* no need for move_char(5) */
  570. X              teleport(40);
  571. X            }
  572. X--- 704,708 ----
  573. X          if (randint(100) == 1)
  574. X            {
  575. X!             find_flag = FALSE;   /* no need for move_char(5) */
  576. X              teleport(40);
  577. X            }
  578. X***************
  579. X*** 753,757 ****
  580. X    switch(*com_val)
  581. X      {
  582. X!     case 0: case 11:        /*^K == exit    */
  583. X        flush();
  584. X        if (get_com("Enter 'Q' to quit", &command))
  585. X--- 753,757 ----
  586. X    switch(*com_val)
  587. X      {
  588. X!     case 11:                /*^K == exit    */
  589. X        flush();
  590. X        if (get_com("Enter 'Q' to quit", &command))
  591. X***************
  592. X*** 1084,1087 ****
  593. X--- 1084,1089 ----
  594. X            restore_char();                   /*^V == restore */
  595. X            prt_stat_block();
  596. X+           /* force generation of new level, in case there is something wrong
  597. X+          with the old one */
  598. X            moria_flag = TRUE;
  599. X            break;
  600. X***************
  601. X*** 1147,1151 ****
  602. X    switch(*com_val)
  603. X      {
  604. X!     case 0: case 'Q':        /*Q == exit    */
  605. X        flush();
  606. X        if (get_com("Do you really want to quit?", &command))
  607. X--- 1149,1153 ----
  608. X    switch(*com_val)
  609. X      {
  610. X!     case 'Q':                /*Q == exit    */
  611. X        flush();
  612. X        if (get_com("Do you really want to quit?", &command))
  613. X***************
  614. X*** 1566,1569 ****
  615. X--- 1568,1573 ----
  616. X            restore_char();                   /*^V == restore */
  617. X            prt_stat_block();
  618. X+           /* force generation of new level, in case there is something wrong
  619. X+          with the old one */
  620. X            moria_flag = TRUE;
  621. X            break;
  622. X*** oldmoria/eat.c    Sun Oct 30 01:18:14 1988
  623. X--- newmoria/eat.c    Sun Oct 30 01:07:35 1988
  624. X***************
  625. X*** 210,214 ****
  626. X          {
  627. X            m_ptr = &py.misc;
  628. X!           m_ptr->exp += ((i_ptr->level/m_ptr->lev) + .5);
  629. X            prt_experience();
  630. X          }
  631. X--- 210,214 ----
  632. X          {
  633. X            m_ptr = &py.misc;
  634. X!           m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev) + 0.5);
  635. X            prt_experience();
  636. X          }
  637. X*** oldmoria/externs.h    Sun Oct 30 01:18:15 1988
  638. X--- newmoria/externs.h    Sun Oct 30 01:07:42 1988
  639. X***************
  640. X*** 12,16 ****
  641. X  extern int missile_ctr;    /* Counter for missiles */
  642. X  extern int msg_flag;    /* Set with first msg  */
  643. X- extern int generate;    /* Generate next level */
  644. X  extern int death;    /* True if died          */
  645. X  extern vtype died_from;    /* What killed him     */
  646. X--- 12,15 ----
  647. X***************
  648. X*** 93,97 ****
  649. X  extern treasure_type object_list[MAX_OBJECTS];
  650. X  extern int object_ident[MAX_OBJECTS];
  651. X! extern int t_level[MAX_OBJ_LEVEL];
  652. X  extern treasure_type gold_list[MAX_GOLD];
  653. X  extern treasure_type t_list[MAX_TALLOC];
  654. X--- 92,96 ----
  655. X  extern treasure_type object_list[MAX_OBJECTS];
  656. X  extern int object_ident[MAX_OBJECTS];
  657. X! extern int t_level[MAX_OBJ_LEVEL+1];
  658. X  extern treasure_type gold_list[MAX_GOLD];
  659. X  extern treasure_type t_list[MAX_TALLOC];
  660. X*** oldmoria/files.c    Sun Oct 30 01:18:00 1988
  661. X--- newmoria/files.c    Sun Oct 30 01:07:36 1988
  662. X***************
  663. X*** 33,37 ****
  664. X    if (1 > (highscore_fd = open(MORIA_TOP, O_RDWR | O_CREAT, 0644)))
  665. X      {
  666. X!       (void) fputs("Can't open score file!\n", stderr);
  667. X        exit(1);
  668. X      }
  669. X--- 33,37 ----
  670. X    if (1 > (highscore_fd = open(MORIA_TOP, O_RDWR | O_CREAT, 0644)))
  671. X      {
  672. X!       (void) fprintf (stderr, "Can't open score file \"%s\"\n", MORIA_TOP);
  673. X        exit(1);
  674. X      }
  675. X***************
  676. X*** 120,138 ****
  677. X    register k, l;
  678. X    register i7, i8;
  679. X!   char dun_line[MAX_WIDTH];
  680. X    char *dun_ptr;
  681. X!   vtype filename1;
  682. X    char tmp_str[80];
  683. X    FILE *file1;
  684. X!   int page_width = OUTPAGE_WIDTH;
  685. X!   int page_height = OUTPAGE_HEIGHT;
  686. X  
  687. X    /* this allows us to strcat each character in the inner loop,
  688. X       instead of using the expensive sprintf */
  689. X!   prt("File name: ", 0, 0);
  690. X!   if (get_string(filename1, 0, 11, 64))
  691. X      {
  692. X!       if (strlen(filename1) == 0)
  693. X!     (void) strcpy(filename1, "MORIAMAP.DAT");
  694. X        if ((file1 = fopen(filename1, "w")) == NULL)
  695. X      {
  696. X--- 120,140 ----
  697. X    register k, l;
  698. X    register i7, i8;
  699. X!   char dun_line[MAX_WIDTH+1];
  700. X    char *dun_ptr;
  701. X!   static vtype filename1 = "MORIAMAP.DAT";
  702. X!   vtype filename2;
  703. X    char tmp_str[80];
  704. X    FILE *file1;
  705. X!   static int page_width = OUTPAGE_WIDTH;
  706. X!   static int page_height = OUTPAGE_HEIGHT;
  707. X  
  708. X    /* this allows us to strcat each character in the inner loop,
  709. X       instead of using the expensive sprintf */
  710. X!   (void) sprintf (tmp_str, "File name [%s]: ", filename1);
  711. X!   prt(tmp_str, 0, 0);
  712. X!   if (get_string(filename2, 0, strlen(tmp_str), 64))
  713. X      {
  714. X!       if (strlen(filename2) > 0)
  715. X!     (void) strcpy(filename1, filename2);
  716. X        if ((file1 = fopen(filename1, "w")) == NULL)
  717. X      {
  718. X***************
  719. X*** 209,212 ****
  720. X--- 211,215 ----
  721. X              }
  722. X            *dun_ptr++ = '\n';
  723. X+           *dun_ptr++ = '\0';
  724. X            (void) fputs(dun_line, file1);
  725. X          }
  726. X*** oldmoria/generate.c    Sun Oct 30 01:17:53 1988
  727. X--- newmoria/generate.c    Sun Oct 30 01:07:37 1988
  728. X***************
  729. X*** 140,145 ****
  730. X  
  731. X    /* Choose starting point and direction        */
  732. X!   y = (cur_height/2.0) + 11 - randint(23);
  733. X!   x = (cur_width/2.0)  + 16 - randint(33);
  734. X  
  735. X    dir = randint(8);    /* Number 1-4, 6-9    */
  736. X--- 140,145 ----
  737. X  
  738. X    /* Choose starting point and direction        */
  739. X!   y = (cur_height / 2) + 11 - randint(23);
  740. X!   x = (cur_width / 2)  + 16 - randint(33);
  741. X  
  742. X    dir = randint(8);    /* Number 1-4, 6-9    */
  743. X*** oldmoria/help.c    Sun Oct 30 01:17:33 1988
  744. X--- newmoria/help.c    Sun Oct 30 01:07:38 1988
  745. X***************
  746. X*** 133,137 ****
  747. X    prt("e       Equipment list.       |  ^X       Save character and quit.",
  748. X        14, 0);
  749. X!   prt("f       Fire/Throw an item.   |   $       Shell out of game.", 15, 0);
  750. X  /*  prt("h       Help on key commands. |", 16, 0); */
  751. X    prt("i       Inventory list.       |  < Go up an up-staircase.", 17, 0);
  752. X--- 133,137 ----
  753. X    prt("e       Equipment list.       |  ^X       Save character and quit.",
  754. X        14, 0);
  755. X!   prt("f       Fire/Throw an item.   |   !       Shell out of game.", 15, 0);
  756. X  /*  prt("h       Help on key commands. |", 16, 0); */
  757. X    prt("i       Inventory list.       |  < Go up an up-staircase.", 17, 0);
  758. X*** oldmoria/io.c    Sun Oct 30 01:17:17 1988
  759. X--- newmoria/io.c    Sun Oct 30 01:07:38 1988
  760. X***************
  761. X*** 3,6 ****
  762. X--- 3,7 ----
  763. X  #include <sys/ioctl.h>
  764. X  #include <sys/file.h>
  765. X+ #include <signal.h>
  766. X  
  767. X  #include "constants.h"
  768. X***************
  769. X*** 231,236 ****
  770. X  char *ch;
  771. X  {
  772. X    put_qio();            /* Dump IO buffer        */
  773. X!   *ch = getch();
  774. X    msg_flag = FALSE;
  775. X  }
  776. X--- 232,251 ----
  777. X  char *ch;
  778. X  {
  779. X+   int i;
  780. X+ 
  781. X    put_qio();            /* Dump IO buffer        */
  782. X!   i = getch();
  783. X!   if ((i == EOF) && (feof (stdin)))
  784. X!     {
  785. X!       prt ("Read end of file!!!!!", 22, 0);
  786. X!       refresh ();
  787. X!       /* fake a call to the signal handler routines to do a panic save */
  788. X! #ifdef USG
  789. X!       signal_save_core (-1);
  790. X! #else
  791. X!       signal_save_core (-1, -1, (struct sigcontext *)0);
  792. X! #endif
  793. X!     }
  794. X!   *ch = i;
  795. X    msg_flag = FALSE;
  796. X  }
  797. X*** oldmoria/main.c    Sun Oct 30 01:18:08 1988
  798. X--- newmoria/main.c    Sun Oct 30 01:07:39 1988
  799. X***************
  800. X*** 134,138 ****
  801. X    if ((argc > 1) && strlen(argv[argc-1]))
  802. X      {     /* Retrieve character    */
  803. X!       generate = get_char(argv[argc-1]);
  804. X        change_name();
  805. X        magic_init();
  806. X--- 134,138 ----
  807. X    if ((argc > 1) && strlen(argv[argc-1]))
  808. X      {     /* Retrieve character    */
  809. X!       get_char(argv[argc-1]);
  810. X        change_name();
  811. X        magic_init();
  812. X***************
  813. X*** 154,158 ****
  814. X        py.misc.cmana = (double)py.misc.mana;
  815. X        magic_init();
  816. X!       generate = TRUE;
  817. X      }
  818. X  
  819. X--- 154,162 ----
  820. X        py.misc.cmana = (double)py.misc.mana;
  821. X        magic_init();
  822. X!       generate_cave();
  823. X!       /* prevent ^c quit from entering score into scoreboard,
  824. X!      and prevent signal from creating panic save until this point,
  825. X!      all info needed for save file is now valid */
  826. X!       character_generated = 1;
  827. X      }
  828. X  
  829. X***************
  830. X*** 164,175 ****
  831. X    clear_screen(0, 0);
  832. X    prt_stat_block();
  833. X-   /* prevent ^c quit from entering score into scoreboard until this point */
  834. X-   character_generated = 1;
  835. X  
  836. X    /* Loop till dead, or exit            */
  837. X    while(!death) {
  838. X-     if (generate)  generate_cave();         /* New level     */
  839. X      dungeon();                                  /* Dungeon logic */
  840. X!     generate = TRUE;
  841. X    }
  842. X    upon_death();                         /* Character gets buried */
  843. X--- 168,176 ----
  844. X    clear_screen(0, 0);
  845. X    prt_stat_block();
  846. X  
  847. X    /* Loop till dead, or exit            */
  848. X    while(!death) {
  849. X      dungeon();                                  /* Dungeon logic */
  850. X!     generate_cave ();                      /* New level */
  851. X    }
  852. X    upon_death();                         /* Character gets buried */
  853. X*** oldmoria/misc1.c    Sun Oct 30 01:17:20 1988
  854. X--- newmoria/misc1.c    Sun Oct 30 01:07:30 1988
  855. X***************
  856. X*** 740,744 ****
  857. X      mon_ptr->csleep = 0;
  858. X        else
  859. X!     mon_ptr->csleep = (c_list[z].sleep/5.0) + randint(c_list[z].sleep);
  860. X      }
  861. X    else
  862. X--- 740,744 ----
  863. X      mon_ptr->csleep = 0;
  864. X        else
  865. X!     mon_ptr->csleep = (c_list[z].sleep / 5) + randint(c_list[z].sleep);
  866. X      }
  867. X    else
  868. X***************
  869. X*** 1074,1078 ****
  870. X    /* abs may be a macro, don't call it with randnor as a parameter */
  871. X    tmp = randnor(0, stand_dev);
  872. X!   x = (abs(tmp)/10.0) + base;
  873. X    if (x < base)
  874. X      return(base);
  875. X--- 1074,1078 ----
  876. X    /* abs may be a macro, don't call it with randnor as a parameter */
  877. X    tmp = randnor(0, stand_dev);
  878. X!   x = (abs(tmp) / 10) + base;
  879. X    if (x < base)
  880. X      return(base);
  881. X*** oldmoria/misc2.c    Sun Oct 30 01:17:07 1988
  882. X--- newmoria/misc2.c    Sun Oct 30 01:07:40 1988
  883. X***************
  884. X*** 291,295 ****
  885. X  
  886. X    popt(&cur_pos);
  887. X!   i = ((randint(dun_level+2)+2)/2.0) - 1;
  888. X    if (randint(OBJ_GREAT) == 1)
  889. X      i += randint(dun_level+1);
  890. X--- 291,295 ----
  891. X  
  892. X    popt(&cur_pos);
  893. X!   i = ((randint(dun_level+2)+2) / 2) - 1;
  894. X    if (randint(OBJ_GREAT) == 1)
  895. X      i += randint(dun_level+1);
  896. X***************
  897. X*** 439,443 ****
  898. X  /* Print character stat in given row, column        -RAK-    */
  899. X  prt_stat(stat_name, stat, row, column)
  900. X! vtype stat_name;
  901. X  byteint stat;
  902. X  int row, column;
  903. X--- 439,443 ----
  904. X  /* Print character stat in given row, column        -RAK-    */
  905. X  prt_stat(stat_name, stat, row, column)
  906. X! char *stat_name;
  907. X  byteint stat;
  908. X  int row, column;
  909. X***************
  910. X*** 456,460 ****
  911. X  /* the longest title is 13 characters, so only pad to 13 */
  912. X  prt_field(info, row, column)
  913. X! vtype info;
  914. X  int row, column;
  915. X  {
  916. X--- 456,460 ----
  917. X  /* the longest title is 13 characters, so only pad to 13 */
  918. X  prt_field(info, row, column)
  919. X! char *info;
  920. X  int row, column;
  921. X  {
  922. X***************
  923. X*** 465,469 ****
  924. X  /* Print number with header at given row, column     -RAK-    */
  925. X  prt_num(header, num, row, column)
  926. X! vtype header;
  927. X  int num, row, column;
  928. X  {
  929. X--- 465,469 ----
  930. X  /* Print number with header at given row, column     -RAK-    */
  931. X  prt_num(header, num, row, column)
  932. X! char *header;
  933. X  int num, row, column;
  934. X  {
  935. X***************
  936. X*** 1367,1371 ****
  937. X  /* Print list of spells                    -RAK-    */
  938. X  print_new_spells(spell, num, redraw)
  939. X! spl_type spell;
  940. X  register int num;
  941. X  int *redraw;
  942. X--- 1367,1371 ----
  943. X  /* Print list of spells                    -RAK-    */
  944. X  print_new_spells(spell, num, redraw)
  945. X! spl_rec *spell;
  946. X  register int num;
  947. X  int *redraw;
  948. X***************
  949. X*** 1392,1399 ****
  950. X  /* Returns spell pointer                 -RAK-    */
  951. X  int get_spell(spell, num, sn, sc, prompt, redraw)
  952. X! spl_type spell;
  953. X  register int num;
  954. X  register int *sn, *sc;
  955. X! vtype prompt;
  956. X  int *redraw;
  957. X  {
  958. X--- 1392,1399 ----
  959. X  /* Returns spell pointer                 -RAK-    */
  960. X  int get_spell(spell, num, sn, sc, prompt, redraw)
  961. X! spl_rec *spell;
  962. X  register int num;
  963. X  register int *sn, *sc;
  964. X! char *prompt;
  965. X  int *redraw;
  966. X  {
  967. X***************
  968. X*** 1844,1848 ****
  969. X        else if (p_ptr->cdex < 118)  blows = 5;
  970. X        else                         blows = 6;
  971. X!       adj_weight = ((p_ptr->cstr*10)/weight);
  972. X        if      (adj_weight < 2)  blows = 1;
  973. X        else if (adj_weight < 3)  blows = (blows/3.0) + 1;
  974. X--- 1844,1848 ----
  975. X        else if (p_ptr->cdex < 118)  blows = 5;
  976. X        else                         blows = 6;
  977. X!       adj_weight = ((p_ptr->cstr*10) / weight);
  978. X        if      (adj_weight < 2)  blows = 1;
  979. X        else if (adj_weight < 3)  blows = (blows/3.0) + 1;
  980. X*** oldmoria/monsters.c    Sun Oct 30 01:16:38 1988
  981. X--- newmoria/monsters.c    Sun Oct 30 01:07:49 1988
  982. X***************
  983. X*** 610,614 ****
  984. X    20,  48, 1, 'T', "14d8"  , "1 1 1d8|1 1 1d8|1 2 1d6|1 2 1d6",   32},
  985. X  {"Invisible Stalker"        ,0x00030022,0x00000000,0x0000,  200,  200,
  986. X!   20,  46, 3, 'E', "19d8"  , "1 1 1d6"                        ,   32},
  987. X  {"Giant Hunter Ant"         ,0x00000002,0x00000000,0x0002,   10,  150,
  988. X    16,  40, 1, 'a', "12d8"   , "1 2 4d8"                        ,   32},
  989. X--- 610,614 ----
  990. X    20,  48, 1, 'T', "14d8"  , "1 1 1d8|1 1 1d8|1 2 1d6|1 2 1d6",   32},
  991. X  {"Invisible Stalker"        ,0x00030022,0x00000000,0x0000,  200,  200,
  992. X!   20,  46, 3, 'I', "19d8"  , "1 1 1d6"                        ,   32},
  993. X  {"Giant Hunter Ant"         ,0x00000002,0x00000000,0x0002,   10,  150,
  994. X    16,  40, 1, 'a', "12d8"   , "1 2 4d8"                        ,   32},
  995. X*** oldmoria/moria1.c    Sun Oct 30 01:17:01 1988
  996. X--- newmoria/moria1.c    Sun Oct 30 01:07:54 1988
  997. X***************
  998. X*** 1375,1380 ****
  999. X  /* When blinded,  move only the player symbol...        */
  1000. X  sub3_move_light(y1, x1, y2, x2)
  1001. X! register int x1, y1;
  1002. X! int x2, y2;
  1003. X  {
  1004. X    register int i, j;
  1005. X--- 1375,1380 ----
  1006. X  /* When blinded,  move only the player symbol...        */
  1007. X  sub3_move_light(y1, x1, y2, x2)
  1008. X! register int y1, x1;
  1009. X! int y2, x2;
  1010. X  {
  1011. X    register int i, j;
  1012. X***************
  1013. X*** 1393,1397 ****
  1014. X  /* With no light,  movement becomes involved...        */
  1015. X  sub4_move_light(y1, x1, y2, x2)
  1016. X! register y1, x1;
  1017. X  int y2, x2;
  1018. X  {
  1019. X--- 1393,1397 ----
  1020. X  /* With no light,  movement becomes involved...        */
  1021. X  sub4_move_light(y1, x1, y2, x2)
  1022. X! register int y1, x1;
  1023. X  int y2, x2;
  1024. X  {
  1025. X***************
  1026. X*** 1645,1651 ****
  1027. X    p_ptr = &py.flags;
  1028. X    if (p_ptr->confused+p_ptr->blind > 0)
  1029. X!     chance = chance / 10.0;
  1030. X    else if (no_light())
  1031. X!     chance = chance / 5.0;
  1032. X    for (i = (y - 1); i <= (y + 1); i++)
  1033. X      for (j = (x - 1); j <= (x + 1); j++)
  1034. X--- 1645,1651 ----
  1035. X    p_ptr = &py.flags;
  1036. X    if (p_ptr->confused+p_ptr->blind > 0)
  1037. X!     chance = chance / 10;
  1038. X    else if (no_light())
  1039. X!     chance = chance / 5;
  1040. X    for (i = (y - 1); i <= (y + 1); i++)
  1041. X      for (j = (x - 1); j <= (x + 1); j++)
  1042. X***************
  1043. X*** 1724,1728 ****
  1044. X      }
  1045. X      }
  1046. X!   if ((find_flag) && (py.flags.blind < 1))
  1047. X      {
  1048. X        switch(dir)
  1049. X--- 1724,1728 ----
  1050. X      }
  1051. X      }
  1052. X!   if (py.flags.blind < 1)
  1053. X      {
  1054. X        switch(dir)
  1055. X***************
  1056. X*** 1784,1799 ****
  1057. X            /* Objects player can see*/
  1058. X            /* Including doors       */
  1059. X!           if (find_flag)
  1060. X!         if (player_light)
  1061. X!           {
  1062. X!             if (c_ptr->tptr != 0)
  1063. X!               if ((t_list[c_ptr->tptr].tval != 101) &&
  1064. X!               (t_list[c_ptr->tptr].tval != 109))
  1065. X!             {
  1066. X!               find_flag = FALSE;  /* no need to call move_light */
  1067. X!               return;
  1068. X!             }
  1069. X!           }
  1070. X!         else if ((c_ptr->tl) || (c_ptr->pl) || (c_ptr->fm))
  1071. X            if (c_ptr->tptr != 0)
  1072. X              if ((t_list[c_ptr->tptr].tval != 101) &&
  1073. X--- 1784,1789 ----
  1074. X            /* Objects player can see*/
  1075. X            /* Including doors       */
  1076. X!           if (player_light)
  1077. X!         {
  1078. X            if (c_ptr->tptr != 0)
  1079. X              if ((t_list[c_ptr->tptr].tval != 101) &&
  1080. X***************
  1081. X*** 1803,1818 ****
  1082. X              return;
  1083. X                }
  1084. X!           /* Creatures             */
  1085. X!           if (find_flag)
  1086. X!         if ((c_ptr->tl) || (c_ptr->pl) || (player_light))
  1087. X!           if (c_ptr->cptr > 1)
  1088. X              {
  1089. X!               m_ptr = &m_list[c_ptr->cptr];
  1090. X!               if (m_ptr->ml)
  1091. X!             {
  1092. X!               find_flag = FALSE;  /* no need to call move_light */
  1093. X!               return;
  1094. X!             }
  1095. X              }
  1096. X          }
  1097. X      }
  1098. X--- 1793,1816 ----
  1099. X              return;
  1100. X                }
  1101. X!         }
  1102. X!           else if ((c_ptr->tl) || (c_ptr->pl) || (c_ptr->fm))
  1103. X!         if (c_ptr->tptr != 0)
  1104. X!           if ((t_list[c_ptr->tptr].tval != 101) &&
  1105. X!               (t_list[c_ptr->tptr].tval != 109))
  1106. X              {
  1107. X!               find_flag = FALSE;  /* no need to call move_light */
  1108. X!               return;
  1109. X              }
  1110. X+           /* Creatures             */
  1111. X+           if ((c_ptr->tl) || (c_ptr->pl) || (player_light))
  1112. X+         if (c_ptr->cptr > 1)
  1113. X+           {
  1114. X+             m_ptr = &m_list[c_ptr->cptr];
  1115. X+             if (m_ptr->ml)
  1116. X+               {
  1117. X+             find_flag = FALSE;  /* no need to call move_light */
  1118. X+             return;
  1119. X+               }
  1120. X+           }
  1121. X          }
  1122. X      }
  1123. X*** oldmoria/moria2.c    Sun Oct 30 01:16:49 1988
  1124. X--- newmoria/moria2.c    Sun Oct 30 01:07:42 1988
  1125. X***************
  1126. X*** 352,355 ****
  1127. X--- 352,361 ----
  1128. X    if (!find_range(90, 91, &i, &k))
  1129. X      msg_print("You are not carrying any books.");
  1130. X+   else if (py.flags.blind > 0)
  1131. X+     msg_print("You can't see to read your spell book!");
  1132. X+   else if (no_light())
  1133. X+     msg_print("You have no light to read by.");
  1134. X+   else if (py.flags.confused > 0)
  1135. X+     msg_print("You are too confused...");
  1136. X    else if (get_item(&item_val, "Which Book?", &redraw, i, k))
  1137. X      {
  1138. X***************
  1139. X*** 739,743 ****
  1140. X        c_ptr = &c_list[m_ptr->mptr];
  1141. X        p_ptr = &py.misc;
  1142. X!       acc_tmp = c_ptr->mexp*((c_ptr->level+0.1)/p_ptr->lev);
  1143. X        i = (int)(acc_tmp);
  1144. X        acc_exp += (acc_tmp - i);
  1145. X--- 745,749 ----
  1146. X        c_ptr = &c_list[m_ptr->mptr];
  1147. X        p_ptr = &py.misc;
  1148. X!       acc_tmp = c_ptr->mexp * ((float) c_ptr->level / (float) p_ptr->lev);
  1149. X        i = (int)(acc_tmp);
  1150. X        acc_exp += (acc_tmp - i);
  1151. X***************
  1152. X*** 1126,1130 ****
  1153. X          if (tmp_str != 0)
  1154. X            tmp_str[0] = '\0';
  1155. X!         (void) strcat(t_ptr->name, " (Empty)");
  1156. X          known2(t_ptr->name);
  1157. X          t_ptr->cost = 0;
  1158. X--- 1132,1136 ----
  1159. X          if (tmp_str != 0)
  1160. X            tmp_str[0] = '\0';
  1161. X!         (void) strcat(t_ptr->name, "(Empty)");
  1162. X          known2(t_ptr->name);
  1163. X          t_ptr->cost = 0;
  1164. X***************
  1165. X*** 1150,1154 ****
  1166. X        else
  1167. X      msg_print("I do not see anything you can open there.");
  1168. X!     }
  1169. X  }
  1170. X  
  1171. X--- 1156,1160 ----
  1172. X        else
  1173. X      msg_print("I do not see anything you can open there.");
  1174. X!     }
  1175. X  }
  1176. X  
  1177. X***************
  1178. X*** 1380,1388 ****
  1179. X        tot = t1 + t2 + t3 + t4;
  1180. X        if (py.flags.blind > 0)
  1181. X!         tot = tot / 5.0;
  1182. X        else if (no_light())
  1183. X!         tot = tot / 2.0;
  1184. X        if (py.flags.confused > 0)
  1185. X!         tot = tot / 3.0;
  1186. X        i = t_list[c_ptr->tptr].tval;
  1187. X        t5 = t_list[c_ptr->tptr].level;
  1188. X--- 1386,1394 ----
  1189. X        tot = t1 + t2 + t3 + t4;
  1190. X        if (py.flags.blind > 0)
  1191. X!         tot = tot / 5;
  1192. X        else if (no_light())
  1193. X!         tot = tot / 2;
  1194. X        if (py.flags.confused > 0)
  1195. X!         tot = tot / 3;
  1196. X        i = t_list[c_ptr->tptr].tval;
  1197. X        t5 = t_list[c_ptr->tptr].level;
  1198. X***************
  1199. X*** 1424,1430 ****
  1200. X                  tmp_str[0] = '\0';
  1201. X                if (0x00000001 & i_ptr->flags)
  1202. X!             (void) strcat(i_ptr->name, " (Locked)");
  1203. X                else
  1204. X!             (void) strcat(i_ptr->name, " (Disarmed)");
  1205. X                msg_print("You have disarmed the chest.");
  1206. X                known2(i_ptr->name);
  1207. X--- 1430,1436 ----
  1208. X                  tmp_str[0] = '\0';
  1209. X                if (0x00000001 & i_ptr->flags)
  1210. X!             (void) strcat(i_ptr->name, "(Locked)");
  1211. X                else
  1212. X!             (void) strcat(i_ptr->name, "(Disarmed)");
  1213. X                msg_print("You have disarmed the chest.");
  1214. X                known2(i_ptr->name);
  1215. X***************
  1216. X*** 1888,1895 ****
  1217. X            i_ptr->tval   = 1;
  1218. X            p_ptr = &py;
  1219. X!           p_ptr->misc.bth    = ((p_ptr->stats.cstr+
  1220. X!                      p_ptr->misc.wt)/6.0);
  1221. X            p_ptr->misc.ptohit = 0;
  1222. X!           p_ptr->misc.ptodam = (p_ptr->misc.wt/75.0) + 1;
  1223. X            if (py_attack(y, x))
  1224. X          {
  1225. X--- 1894,1900 ----
  1226. X            i_ptr->tval   = 1;
  1227. X            p_ptr = &py;
  1228. X!           p_ptr->misc.bth    = ((p_ptr->stats.cstr + p_ptr->misc.wt) / 6);
  1229. X            p_ptr->misc.ptohit = 0;
  1230. X!           p_ptr->misc.ptodam = (p_ptr->misc.wt / 75) + 1;
  1231. X            if (py_attack(y, x))
  1232. X          {
  1233. X*** oldmoria/potions.c    Sun Oct 30 01:17:27 1988
  1234. X--- newmoria/potions.c    Sun Oct 30 01:07:42 1988
  1235. X***************
  1236. X*** 253,257 ****
  1237. X                msg_print("You feel your memories fade...");
  1238. X                /* avoid randint(0) call */
  1239. X!               l = (py.misc.exp/5.0);
  1240. X                if (l == 0)
  1241. X              lose_exp(1);
  1242. X--- 253,257 ----
  1243. X                msg_print("You feel your memories fade...");
  1244. X                /* avoid randint(0) call */
  1245. X!               l = (py.misc.exp / 5);
  1246. X                if (l == 0)
  1247. X              lose_exp(1);
  1248. X***************
  1249. X*** 360,364 ****
  1250. X          {
  1251. X            m_ptr = &py.misc;
  1252. X!           m_ptr->exp += (int)(i_ptr->level/m_ptr->lev + 0.5);
  1253. X            prt_experience();
  1254. X          }
  1255. X--- 360,364 ----
  1256. X          {
  1257. X            m_ptr = &py.misc;
  1258. X!           m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev) + 0.5);
  1259. X            prt_experience();
  1260. X          }
  1261. X*** oldmoria/save.c    Sun Oct 30 01:17:39 1988
  1262. X--- newmoria/save.c    Sun Oct 30 01:07:43 1988
  1263. X***************
  1264. X*** 311,315 ****
  1265. X    else if (flag)
  1266. X      {
  1267. X!       (void) sprintf(temp,"Character saved. [Moria Version %lf]",CUR_VERSION);
  1268. X        prt(temp, 0, 0);
  1269. X        if (exit)
  1270. X--- 311,315 ----
  1271. X    else if (flag)
  1272. X      {
  1273. X!       (void) sprintf(temp,"Character saved. [Moria Version %.2lf]\n",CUR_VERSION);
  1274. X        prt(temp, 0, 0);
  1275. X        if (exit)
  1276. X***************
  1277. X*** 471,475 ****
  1278. X    controlz();
  1279. X  
  1280. X!   if (buf.st_atime >= buf2.st_atime + 5)
  1281. X      {
  1282. X        (void) sprintf(temp, "File %s has been touched, sorry.", fnam);
  1283. X--- 471,475 ----
  1284. X    controlz();
  1285. X  
  1286. X!   if (buf.st_mtime >= buf2.st_mtime + 5)
  1287. X      {
  1288. X        (void) sprintf(temp, "File %s has been touched, sorry.", fnam);
  1289. X***************
  1290. X*** 495,499 ****
  1291. X    else
  1292. X      {
  1293. X!       age = (long)buf2.st_atime - (long)buf.st_atime;  /* age in seconds */
  1294. X        age = (age / 86400) + 1;  /* age in days */
  1295. X        for (i = 0; i < age; i++)
  1296. X--- 495,499 ----
  1297. X    else
  1298. X      {
  1299. X!       age = (long)buf2.st_atime - (long)buf.st_mtime;  /* age in seconds */
  1300. X        age = (age / 86400) + 1;  /* age in days */
  1301. X        for (i = 0; i < age; i++)
  1302. X***************
  1303. X*** 508,511 ****
  1304. X--- 508,517 ----
  1305. X      }
  1306. X  
  1307. X+   /* prevent ^c quit from entering score into scoreboard,
  1308. X+      and prevent signal from creating panic save until this point,
  1309. X+      old save file has just been deleted */
  1310. X+   character_generated = 1;
  1311. X+ 
  1312. X+ #ifndef SCORE_PANIC_SAVES
  1313. X    if (panic_save == 1)
  1314. X      {
  1315. X***************
  1316. X*** 515,518 ****
  1317. X--- 521,525 ----
  1318. X        msg_print (" ");
  1319. X      }
  1320. X+ #endif
  1321. X  
  1322. X    /* reidentify objects */
  1323. X***************
  1324. X*** 531,535 ****
  1325. X        death = 1;
  1326. X      }
  1327. X- 
  1328. X-   return(FALSE);
  1329. X  }
  1330. X--- 538,540 ----
  1331. X*** oldmoria/scrolls.c    Sun Oct 30 01:18:02 1988
  1332. X--- newmoria/scrolls.c    Sun Oct 30 01:07:44 1988
  1333. X***************
  1334. X*** 480,491 ****
  1335. X              if (!first)
  1336. X                {
  1337. X-             desc_remain(item_val);
  1338. X-             inven_destroy(item_val);
  1339. X              if (i_ptr->flags != 0)
  1340. X                {
  1341. X                  m_ptr = &py.misc;
  1342. X!                 m_ptr->exp += (i_ptr->level/m_ptr->lev);
  1343. X                  prt_experience();
  1344. X                }
  1345. X                }
  1346. X            }
  1347. X--- 480,492 ----
  1348. X              if (!first)
  1349. X                {
  1350. X              if (i_ptr->flags != 0)
  1351. X                {
  1352. X                  m_ptr = &py.misc;
  1353. X!                 m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev)
  1354. X!                        + 0.5);
  1355. X                  prt_experience();
  1356. X                }
  1357. X+             desc_remain(item_val);
  1358. X+             inven_destroy(item_val);
  1359. X                }
  1360. X            }
  1361. X*** oldmoria/signals.c    Sun Oct 30 01:17:02 1988
  1362. X--- newmoria/signals.c    Sun Oct 30 01:07:44 1988
  1363. X***************
  1364. X*** 14,18 ****
  1365. X  
  1366. X  extern int total_winner;
  1367. X- extern int moria_flag;
  1368. X  extern int search_flag;
  1369. X  
  1370. X--- 14,17 ----
  1371. X***************
  1372. X*** 74,78 ****
  1373. X    error_sig = sig;
  1374. X    error_code = 0;
  1375. X!   if (!character_saved)
  1376. X      {
  1377. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1378. X--- 73,77 ----
  1379. X    error_sig = sig;
  1380. X    error_code = 0;
  1381. X!   if (!character_saved && character_generated)
  1382. X      {
  1383. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1384. X***************
  1385. X*** 110,114 ****
  1386. X    error_sig = sig;
  1387. X    error_code = code;
  1388. X!   if (!character_saved)
  1389. X      {
  1390. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1391. X--- 109,113 ----
  1392. X    error_sig = sig;
  1393. X    error_code = code;
  1394. X!   if (!character_saved && character_generated)
  1395. X      {
  1396. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1397. X***************
  1398. X*** 147,151 ****
  1399. X    error_sig = sig;
  1400. X    error_code = 0;
  1401. X!   if (!character_saved)
  1402. X      save_char(FALSE, TRUE);
  1403. X    exit_game();
  1404. X--- 146,150 ----
  1405. X    error_sig = sig;
  1406. X    error_code = 0;
  1407. X!   if (!character_saved && character_generated)
  1408. X      save_char(FALSE, TRUE);
  1409. X    exit_game();
  1410. X***************
  1411. X*** 163,167 ****
  1412. X    error_sig = sig;
  1413. X    error_code = code;
  1414. X!   if (!character_saved)
  1415. X      save_char(FALSE, TRUE);
  1416. X    exit_game();
  1417. X--- 162,166 ----
  1418. X    error_sig = sig;
  1419. X    error_code = code;
  1420. X!   if (!character_saved && character_generated)
  1421. X      save_char(FALSE, TRUE);
  1422. X    exit_game();
  1423. X***************
  1424. X*** 186,189 ****
  1425. X--- 185,190 ----
  1426. X        return;
  1427. X      }
  1428. X+   /* flush input just in case */
  1429. X+   flush ();
  1430. X    if (get_com("Do you really want to quit?", &command))
  1431. X      switch(command)
  1432. X***************
  1433. X*** 204,209 ****
  1434. X      {
  1435. X        put_buffer(" -more-", MSG_LINE, 0);
  1436. X-       put_qio();
  1437. X      }
  1438. X  }
  1439. X  #else
  1440. X--- 205,210 ----
  1441. X      {
  1442. X        put_buffer(" -more-", MSG_LINE, 0);
  1443. X      }
  1444. X+   put_qio();
  1445. X  }
  1446. X  #else
  1447. X***************
  1448. X*** 223,226 ****
  1449. X--- 224,229 ----
  1450. X        return;
  1451. X      }
  1452. X+   /* flush input just in case */
  1453. X+   flush();
  1454. X    if (get_com("Do you really want to quit?", &command))
  1455. X      switch(command)
  1456. X***************
  1457. X*** 241,246 ****
  1458. X      {
  1459. X        put_buffer(" -more-", MSG_LINE, 0);
  1460. X-       put_qio();
  1461. X      }
  1462. X  }
  1463. X  #endif
  1464. X--- 244,249 ----
  1465. X      {
  1466. X        put_buffer(" -more-", MSG_LINE, 0);
  1467. X      }
  1468. X+   put_qio();
  1469. X  }
  1470. X  #endif
  1471. X*** oldmoria/spells.c    Sun Oct 30 01:18:23 1988
  1472. X--- newmoria/spells.c    Sun Oct 30 01:07:45 1988
  1473. X***************
  1474. X*** 499,502 ****
  1475. X--- 499,503 ----
  1476. X    register int destroy;
  1477. X    register cave_type *c_ptr;
  1478. X+   char *tmp_str;
  1479. X  
  1480. X    destroy = FALSE;
  1481. X***************
  1482. X*** 516,521 ****
  1483. X            }
  1484. X          else if (t_list[c_ptr->tptr].tval == 2)
  1485. X!           /* destroy traps on chest and unlock */
  1486. X!           t_list[c_ptr->tptr].flags &= 0xFF000000;
  1487. X        }
  1488. X        }
  1489. X--- 517,530 ----
  1490. X            }
  1491. X          else if (t_list[c_ptr->tptr].tval == 2)
  1492. X!           {
  1493. X!         /* destroy traps on chest and unlock */
  1494. X!         t_list[c_ptr->tptr].flags &= 0xFF000000;
  1495. X!         tmp_str = index(t_list[c_ptr->tptr].name, '(');
  1496. X!         if (tmp_str != 0)
  1497. X!           tmp_str[0] = '\0';
  1498. X!         (void) strcat (t_list[c_ptr->tptr].name, "(Disarmed)");
  1499. X!         msg_print ("You have disarmed the chest.");
  1500. X!         known2 (t_list[c_ptr->tptr].name);
  1501. X!           }
  1502. X        }
  1503. X        }
  1504. X***************
  1505. X*** 672,676 ****
  1506. X          if (i >= 0)
  1507. X            t_ptr->name[i] = '\0';
  1508. X!         (void) strcat(t_ptr->name, " (Unlocked)");
  1509. X          known2(t_ptr->name);
  1510. X            }
  1511. X--- 681,685 ----
  1512. X          if (i >= 0)
  1513. X            t_ptr->name[i] = '\0';
  1514. X!         (void) strcat(t_ptr->name, "(Unlocked)");
  1515. X          known2(t_ptr->name);
  1516. X            }
  1517. X***************
  1518. X*** 737,741 ****
  1519. X  int fire_bolt(typ, dir, y, x, dam, bolt_typ)
  1520. X  int typ, dir, y, x, dam;
  1521. X! ctype bolt_typ;
  1522. X  {
  1523. X    int i, oldy, oldx, dist;
  1524. X--- 746,750 ----
  1525. X  int fire_bolt(typ, dir, y, x, dam, bolt_typ)
  1526. X  int typ, dir, y, x, dam;
  1527. X! char *bolt_typ;
  1528. X  {
  1529. X    int i, oldy, oldx, dist;
  1530. X***************
  1531. X*** 784,788 ****
  1532. X              dam = dam*2;
  1533. X            else if (weapon_type & r_ptr->spells)
  1534. X!             dam = (dam/4.0);
  1535. X            i = mon_take_hit((int)c_ptr->cptr, dam);
  1536. X            monster_name(m_name, m_ptr, r_ptr);
  1537. X--- 793,797 ----
  1538. X              dam = dam*2;
  1539. X            else if (weapon_type & r_ptr->spells)
  1540. X!             dam = (dam / 4);
  1541. X            i = mon_take_hit((int)c_ptr->cptr, dam);
  1542. X            monster_name(m_name, m_ptr, r_ptr);
  1543. X***************
  1544. X*** 830,834 ****
  1545. X  int fire_ball(typ, dir, y, x, dam_hp, descrip)
  1546. X  int typ, dir, y, x, dam_hp;
  1547. X! ctype descrip;
  1548. X  {
  1549. X    register int i, j;
  1550. X--- 839,843 ----
  1551. X  int fire_ball(typ, dir, y, x, dam_hp, descrip)
  1552. X  int typ, dir, y, x, dam_hp;
  1553. X! char *descrip;
  1554. X  {
  1555. X    register int i, j;
  1556. X***************
  1557. X*** 1009,1013 ****
  1558. X                dam = dam*2;
  1559. X              else if (weapon_type & r_ptr->spells)
  1560. X!               dam = (dam/4.0);
  1561. X              dam = (dam/(distance(i, j, y, x)+1));
  1562. X              m_ptr->hp = m_ptr->hp - dam;
  1563. X--- 1018,1022 ----
  1564. X                dam = dam*2;
  1565. X              else if (weapon_type & r_ptr->spells)
  1566. X!               dam = (dam / 4);
  1567. X              dam = (dam/(distance(i, j, y, x)+1));
  1568. X              m_ptr->hp = m_ptr->hp - dam;
  1569. X***************
  1570. X*** 1528,1533 ****
  1571. X              }
  1572. X          }
  1573. X-           else
  1574. X-         flag = TRUE;
  1575. X          }
  1576. X      }
  1577. X--- 1537,1540 ----
  1578. X***************
  1579. X*** 2167,2171 ****
  1580. X                    c_list[m_ptr->mptr].cmove);
  1581. X          p_ptr = &py.misc;
  1582. X!         p_ptr->exp += ((r_ptr->mexp*(r_ptr->level/p_ptr->lev)) + 0.5);
  1583. X          delete_monster(i);
  1584. X            }
  1585. X--- 2174,2179 ----
  1586. X                    c_list[m_ptr->mptr].cmove);
  1587. X          p_ptr = &py.misc;
  1588. X!         p_ptr->exp += ((r_ptr->mexp * ((float) r_ptr->level / (float) p_ptr->lev))
  1589. X!                    + 0.5);
  1590. X          delete_monster(i);
  1591. X            }
  1592. X***************
  1593. X*** 2444,2448 ****
  1594. X    if (f_ptr->poisoned > 0)
  1595. X      {
  1596. X!       f_ptr->poisoned = f_ptr->poisoned / 2.0;
  1597. X        if (f_ptr->poisoned < 1)  f_ptr->poisoned = 1;
  1598. X        slow = TRUE;
  1599. X--- 2452,2456 ----
  1600. X    if (f_ptr->poisoned > 0)
  1601. X      {
  1602. X!       f_ptr->poisoned = f_ptr->poisoned / 2;
  1603. X        if (f_ptr->poisoned < 1)  f_ptr->poisoned = 1;
  1604. X        slow = TRUE;
  1605. X*** oldmoria/staffs.c    Sun Oct 30 01:18:17 1988
  1606. X--- newmoria/staffs.c    Sun Oct 30 01:07:46 1988
  1607. X***************
  1608. X*** 29,33 ****
  1609. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level - 5;
  1610. X            if (py.flags.confused > 0)
  1611. X!         chance = chance / 2.0;
  1612. X            if (chance <= 0)  chance = 1;
  1613. X            if (randint(chance) < USE_DEVICE)
  1614. X--- 29,33 ----
  1615. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level - 5;
  1616. X            if (py.flags.confused > 0)
  1617. X!         chance = chance / 2;
  1618. X            if (chance <= 0)  chance = 1;
  1619. X            if (randint(chance) < USE_DEVICE)
  1620. X***************
  1621. X*** 144,148 ****
  1622. X              {
  1623. X                m_ptr = &py.misc;
  1624. X!               m_ptr->exp += ((i_ptr->level/m_ptr->lev) + 0.5);
  1625. X                prt_experience();
  1626. X              }
  1627. X--- 144,148 ----
  1628. X              {
  1629. X                m_ptr = &py.misc;
  1630. X!               m_ptr->exp += (((float)i_ptr->level / (float)m_ptr->lev) + 0.5);
  1631. X                prt_experience();
  1632. X              }
  1633. X*** oldmoria/store1.c    Sun Oct 30 01:17:11 1988
  1634. X--- newmoria/store1.c    Sun Oct 30 01:07:46 1988
  1635. X***************
  1636. X*** 122,126 ****
  1637. X        else if (index(i_ptr->name, '^') == 0)
  1638. X      {
  1639. X!       value = i_ptr->cost + (i_ptr->cost/20.0)*i_ptr->p1;
  1640. X      }
  1641. X      }
  1642. X--- 122,126 ----
  1643. X        else if (index(i_ptr->name, '^') == 0)
  1644. X      {
  1645. X!       value = i_ptr->cost + (i_ptr->cost / 20) * i_ptr->p1;
  1646. X      }
  1647. X      }
  1648. X*** oldmoria/store2.c    Sun Oct 30 01:17:56 1988
  1649. X--- newmoria/store2.c    Sun Oct 30 01:07:47 1988
  1650. X***************
  1651. X*** 960,964 ****
  1652. X        /* make sure player sees the message */
  1653. X        msg_print(" ");
  1654. X!       if ((store_buy[store_num])(inventory[INVEN_MAX].tval))
  1655. X      if (store_check_num(store_num))
  1656. X        switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  1657. X--- 960,964 ----
  1658. X        /* make sure player sees the message */
  1659. X        msg_print(" ");
  1660. X!       if ((*store_buy[store_num])(inventory[INVEN_MAX].tval))
  1661. X      if (store_check_num(store_num))
  1662. X        switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  1663. X*** oldmoria/treasure1.c    Sun Oct 30 01:16:43 1988
  1664. X--- newmoria/treasure1.c    Sun Oct 30 01:07:56 1988
  1665. X***************
  1666. X*** 637,641 ****
  1667. X  {"& Light Brown Potion~| of Apple Juice"           ,  75, '!',0x00000000,
  1668. X    250,      1, 282,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1669. X! {"& Clear Potion~| of Water"                       ,  75, '!',0x00000000,
  1670. X    200,      0, 283,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1671. X  {"& %C Potion~| of Gain Dexterity"                 ,  75, '!',0x02000000,
  1672. X--- 637,641 ----
  1673. X  {"& Light Brown Potion~| of Apple Juice"           ,  75, '!',0x00000000,
  1674. X    250,      1, 282,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1675. X! {"& Crystal Clear Potion~| of Water"               ,  75, '!',0x00000000,
  1676. X    200,      0, 283,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1677. X  {"& %C Potion~| of Gain Dexterity"                 ,  75, '!',0x02000000,
  1678. X***************
  1679. X*** 775,793 ****
  1680. X  {"& %W Staff| of Darkness^ (%P1 charges)"          ,  55, '_',0x01000000,
  1681. X      0,      0,  25,  50,   1,   0,   0,   0,   0, "1d2"  ,  5},
  1682. X! {"& Book of Magic Spells [Beginners-Magik]"        ,  90, '?',0x0000007F,
  1683. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1684. X! {"& Book of Magic Spells [Magik I]"                ,  90, '?',0x0000FF80,
  1685. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1686. X! {"& Book of Magic Spells [Magik II]"               ,  90, '?',0x00FF0000,
  1687. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1688. X! {"& Book of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1689. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1690. X! {"& Holy Book of Prayers [Beginners Handbook]"     ,  91, '?',0x000000FF,
  1691. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1692. X! {"& Holy Book of Prayers [Words of Wisdom]"        ,  91, '?',0x0000FF00,
  1693. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1694. X! {"& Holy Book of Prayers [Chants and Blessings]"   ,  91, '?',0x01FF0000,
  1695. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1696. X! {"& Holy Book of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1697. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1698. X  {"& Small wooden chest"                            ,   2, '&',0x0F000000,
  1699. X--- 775,793 ----
  1700. X  {"& %W Staff| of Darkness^ (%P1 charges)"          ,  55, '_',0x01000000,
  1701. X      0,      0,  25,  50,   1,   0,   0,   0,   0, "1d2"  ,  5},
  1702. X! {"& Book~ of Magic Spells [Beginners-Magik]"       ,  90, '?',0x0000007F,
  1703. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1704. X! {"& Book~ of Magic Spells [Magik I]"               ,  90, '?',0x0000FF80,
  1705. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1706. X! {"& Book~ of Magic Spells [Magik II]"              ,  90, '?',0x00FF0000,
  1707. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1708. X! {"& Book~ of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1709. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1710. X! {"& Holy Book~ of Prayers [Beginners Handbook]"    ,  91, '?',0x000000FF,
  1711. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1712. X! {"& Holy Book~ of Prayers [Words of Wisdom]"       ,  91, '?',0x0000FF00,
  1713. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1714. X! {"& Holy Book~ of Prayers [Chants and Blessings]"  ,  91, '?',0x01FF0000,
  1715. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1716. X! {"& Holy Book~ of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1717. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1718. X  {"& Small wooden chest"                            ,   2, '&',0x0F000000,
  1719. X*** oldmoria/treasure2.c    Sun Oct 30 01:17:50 1988
  1720. X--- newmoria/treasure2.c    Sun Oct 30 01:07:58 1988
  1721. X***************
  1722. X*** 98,104 ****
  1723. X  {"& Strip~ of Beef Jerky"                          ,  80, ',',0x00000000,
  1724. X   1750,      2, 310,   2,   5,   0,   0,   0,   0, "0d0"  ,  0}, /*  3*/
  1725. X! {"& Pint of Fine Ale"                              ,  80, ',',0x00000000,
  1726. X    500,      1, 311,  10,   3,   0,   0,   0,   0, "0d0"  ,  0}, /*  4*/
  1727. X! {"& Pint of Fine Wine"                             ,  80, ',',0x00000000,
  1728. X    400,      2, 312,  10,   1,   0,   0,   0,   0, "0d0"  ,  0}, /*  5*/
  1729. X  {"& Dagger (Misericorde) (%P2,%P3)"                ,  23, '|',0x00000000,
  1730. X--- 98,104 ----
  1731. X  {"& Strip~ of Beef Jerky"                          ,  80, ',',0x00000000,
  1732. X   1750,      2, 310,   2,   5,   0,   0,   0,   0, "0d0"  ,  0}, /*  3*/
  1733. X! {"& Pint~ of Fine Ale"                              ,  80, ',',0x00000000,
  1734. X    500,      1, 311,  10,   3,   0,   0,   0,   0, "0d0"  ,  0}, /*  4*/
  1735. X! {"& Pint~ of Fine Wine"                            ,  80, ',',0x00000000,
  1736. X    400,      2, 312,  10,   1,   0,   0,   0,   0, "0d0"  ,  0}, /*  5*/
  1737. X  {"& Dagger (Misericorde) (%P2,%P3)"                ,  23, '|',0x00000000,
  1738. X***************
  1739. X*** 224,242 ****
  1740. X  {"& Scroll~ of Recharging"                         ,  70, '?',0x01000000,
  1741. X      0,    200, 311,   5,   1,   0,   0,   0,   0, "0d0"  ,  0}, /* 66*/
  1742. X! {"& Book of Magic Spells [Beginners-Magik]"        ,  90, '?',0x0000007F,
  1743. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 67*/
  1744. X! {"& Book of Magic Spells [Magik I]"                ,  90, '?',0x0000FF80,
  1745. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 68*/
  1746. X! {"& Book of Magic Spells [Magik II]"               ,  90, '?',0x00FF0000,
  1747. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 69*/
  1748. X! {"& Book of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1749. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 70*/
  1750. X! {"& Holy Book of Prayers [Beginners Handbook]"     ,  91, '?',0x000000FF,
  1751. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 71*/
  1752. X! {"& Holy Book of Prayers [Words of Wisdom]"        ,  91, '?',0x0000FF00,
  1753. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 72*/
  1754. X! {"& Holy Book of Prayers [Chants and Blessings]"   ,  91, '?',0x01FF0000,
  1755. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 73*/
  1756. X! {"& Holy Book of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1757. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 74*/
  1758. X  {"& Potion~ of Restore Strength"                   ,  75, '!',0x00000004,
  1759. X--- 224,242 ----
  1760. X  {"& Scroll~ of Recharging"                         ,  70, '?',0x01000000,
  1761. X      0,    200, 311,   5,   1,   0,   0,   0,   0, "0d0"  ,  0}, /* 66*/
  1762. X! {"& Book~ of Magic Spells [Beginners-Magik]"       ,  90, '?',0x0000007F,
  1763. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 67*/
  1764. X! {"& Book~ of Magic Spells [Magik I]"               ,  90, '?',0x0000FF80,
  1765. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 68*/
  1766. X! {"& Book~ of Magic Spells [Magik II]"              ,  90, '?',0x00FF0000,
  1767. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 69*/
  1768. X! {"& Book~ of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1769. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 70*/
  1770. X! {"& Holy Book~ of Prayers [Beginners Handbook]"    ,  91, '?',0x000000FF,
  1771. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 71*/
  1772. X! {"& Holy Book~ of Prayers [Words of Wisdom]"       ,  91, '?',0x0000FF00,
  1773. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 72*/
  1774. X! {"& Holy Book~ of Prayers [Chants and Blessings]"  ,  91, '?',0x01FF0000,
  1775. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 73*/
  1776. X! {"& Holy Book~ of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1777. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 74*/
  1778. X  {"& Potion~ of Restore Strength"                   ,  75, '!',0x00000004,
  1779. X***************
  1780. X*** 426,428 ****
  1781. X  {"a down staircase"                                , 108, '>',0x00000000,
  1782. X      0,      0,   1,   0,   1,   0,   0,   0,   0, "1d1"  ,  0};
  1783. X- 
  1784. X--- 426,427 ----
  1785. X*** oldmoria/types.h    Sun Oct 30 01:17:08 1988
  1786. X--- newmoria/types.h    Sun Oct 30 01:07:48 1988
  1787. X***************
  1788. X*** 191,195 ****
  1789. X  } spl_rec;
  1790. X  
  1791. X! typedef spl_rec spl_type[22];
  1792. X  
  1793. X  typedef struct race_type
  1794. X--- 191,195 ----
  1795. X  } spl_rec;
  1796. X  
  1797. X! typedef spl_rec spl_type[32];
  1798. X  
  1799. X  typedef struct race_type
  1800. X*** oldmoria/variables.c    Sun Oct 30 01:17:14 1988
  1801. X--- newmoria/variables.c    Sun Oct 30 01:07:51 1988
  1802. X***************
  1803. X*** 16,20 ****
  1804. X  int missile_ctr = 0;             /* Counter for missiles */
  1805. X  int msg_flag;                    /* Set with first msg  */
  1806. X- int generate;                    /* Generate next level */
  1807. X  int death = FALSE;            /* True if died          */
  1808. X  vtype died_from;            /* What killed him     */
  1809. X--- 16,19 ----
  1810. X*** oldmoria/wands.c    Sun Oct 30 01:16:56 1988
  1811. X--- newmoria/wands.c    Sun Oct 30 01:07:49 1988
  1812. X***************
  1813. X*** 46,50 ****
  1814. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level;
  1815. X            if (py.flags.confused > 0)
  1816. X!             chance = chance / 2.0;
  1817. X            if (chance <= 0)  chance = 1;
  1818. X            if (randint(chance) < USE_DEVICE)
  1819. X--- 46,50 ----
  1820. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level;
  1821. X            if (py.flags.confused > 0)
  1822. X!             chance = chance / 2;
  1823. X            if (chance <= 0)  chance = 1;
  1824. X            if (randint(chance) < USE_DEVICE)
  1825. X***************
  1826. X*** 158,162 ****
  1827. X              {
  1828. X                m_ptr = &py.misc;
  1829. X!               m_ptr->exp += ((i_ptr->level/m_ptr->lev) + 0.5);
  1830. X                prt_experience();
  1831. X              }
  1832. X--- 158,162 ----
  1833. X              {
  1834. X                m_ptr = &py.misc;
  1835. X!               m_ptr->exp += (((float)i_ptr->level / (float)m_ptr->lev) + 0.5);
  1836. X                prt_experience();
  1837. X              }
  1838. X*** oldmoria/wizard.c    Sun Oct 30 01:18:09 1988
  1839. X--- newmoria/wizard.c    Sun Oct 30 01:07:50 1988
  1840. X***************
  1841. X*** 23,27 ****
  1842. X  
  1843. X    clear_screen(0, 0);
  1844. X!   (void) sprintf(tmp_str, "               Moria Version %f", CUR_VERSION);
  1845. X    put_buffer(tmp_str, 0, 0);
  1846. X    put_buffer("Version 0.1  : 03/25/83", 1, 0);
  1847. X--- 23,27 ----
  1848. X  
  1849. X    clear_screen(0, 0);
  1850. X!   (void) sprintf(tmp_str, "               Moria Version %.2lf", CUR_VERSION);
  1851. X    put_buffer(tmp_str, 0, 0);
  1852. X    put_buffer("Version 0.1  : 03/25/83", 1, 0);
  1853. X***************
  1854. X*** 54,57 ****
  1855. X--- 54,60 ----
  1856. X    put_buffer("Please call it 'umoria' or 'UNIX MORIA' or something", 9, 0);
  1857. X    put_buffer("similar to avoid confusion.", 10, 0);
  1858. X+   (void) sprintf(tmp_str, "Moria Version %.2lf, patch level %d", CUR_VERSION,
  1859. X+          PATCH_LEVEL);
  1860. X+   put_buffer(tmp_str, 12, 0);
  1861. X    pause_line(23);
  1862. X    draw_cave();
  1863. X
  1864. END_OF_patches04
  1865. if test 60251 -ne `wc -c <patches04`; then
  1866.     echo shar: \"patches04\" unpacked with wrong size!
  1867. fi
  1868. # end of overwriting check
  1869. fi
  1870. echo shar: End of shell archive.
  1871. exit 0
  1872.